<%--

  @author yulezhisi
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>index</title>
    <link rel="shortcut icon" href="<c:url value="/images/favicon.ico"/>" type="image/x-icon"/>
    <script src="<c:url value="/js/jquery-1.9.1.min.js"/>"></script>
    <script src="<c:url value="/layui/layui.js"/>"></script>
    <link rel="stylesheet" type="text/css" href="<c:url value="/layui/css/layui.css"/>">
    
    <script src="<c:url value="/js/my/commons.js"/>"></script>
    <style>
        .container {
            width: 1200px;
            margin: 100px auto;
        }
    </style>

</head>
<body>

<%--头部--%>
<div class="layui-layout layui-layout-admin layui-row" id="header">
    <div class="layui-header layui-row">
        <div class="layui-logo " style="margin-left: -40px;">
            <a data-url="welcome.jsp" data-id="0" data-title="欢迎页"
               class="site-actTab-active " href="javascript:"
               data-type="tabAdd"
               style="font-size: 20px;color: white;">
                <i class="layui-icon layui-icon-home " style="font-size: 30px;
                            color: #1E9FFF;line-height: 30px"></i>
                &nbsp;&nbsp;&nbsp;首页
            </a>
        </div>
        
        <div class="layui-col-md6 layui-col-lg-offset4">
            <%--导航条--%>
            <ul class="layui-nav layui-layout-body" lay-filter="" id="ul_nav">
                <li class="layui-nav-item layui-this"><a href="${pageContext.request.contextPath}/index.jsp">首页</a></li>
                <li class="layui-nav-item"><a
                        href="<c:url value="/doc.html?showMenuApi=1&showDes=1&plus=1&cache=1&cacheApi=1"/>" target="_blank">接口文档</a>
                </li>
            </ul>
        </div>
        
        <%--个人资料--%>
        <ul class="layui-nav layui-layout-right" style="position: relative;right: 100px;">
            <c:if test="${not empty sessionScope.user}">
                <li class="layui-nav-item">
                    <a href="javascript:">
                        <img src="<c:url value="/images/favicon.ico"/>" class="layui-nav-img" alt="">
                            ${sessionScope.user.username}
                        (${sessionScope.user.nickname})
                    </a>
                    <dl class="layui-nav-child">
                        <dd>
                            <a href="<c:url value="/"/>">基本资料</a>
                        </dd>
                        <dd>
                            <a href="">安全设置</a>
                        </dd>
                        <dd>
                            <a data-url="https://www.baidu.com" data-id="3" data-title="销售机会"
                               class="site-actTab-active" href="javascript:" data-type="tabAdd">销售机会</a>
                        </dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="logout">退了</a>
                </li>
            </c:if>
            <c:if test="${empty sessionScope.user}">
                <li class="layui-nav-item">
                    <button class="layui-btn layui-btn-checked" onclick="login()">登录</button>
                </li>
            </c:if>
        </ul>
    </div>
</div>

<%--主体--%>
<div class="container">
    <div class="layui-layout  layui-layout-admin">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <div class="layui-side layui-bg-black">
            <div class="layui-side-scroll">
                
                <c:if test="${not empty sessionScope.user}">
                    <script>
                        var user = '${sessionScope.user}';
                    </script>
                    
                    <br>
                    <ul class="layui-nav layui-nav-tree" lay-shrink="all" lay-filter="test" id="left_nav_ul">
                            <%--个人工作台--%>
                        <div><p style="font-size: 14px">在线办公</p></div>
                        <br>
                        <li class="layui-nav-item " lay-shrink="all">
                            <a class="" href="javascript:">我的工作</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="我的待办"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;我的待办</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="我的已办"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;我的已办</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="工作计划"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;工作计划</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--公文管理--%>
                        <li class="layui-nav-item ">
                            <a class="" href="javascript:">公文管理</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="公司发文"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;公司发文</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="公司收文"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;公司收文</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="发文审批"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;发文审批</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="收文历史"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;收文历史</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--请假/外出流程--%>
                        <li class="layui-nav-item ">
                            <a class="" href="javascript:">请假/外出申请</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="请假申请"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;请假申请</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="外出申请"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;外出申请</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--通知 消息公告--%>
                        <li class="layui-nav-item ">
                            <a class="" href="javascript:">通知公告</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="发布新公告"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;发布新公告</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="收到的公告"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;收到的公告</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--邮件--%>
                        <li class="layui-nav-item ">
                            <a class="" href="javascript:">邮件</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="随意"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;随意</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="随意"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;随意</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--文件管理--%>
                        <li class="layui-nav-item ">
                            <a class="" href="javascript:">文件档案管理</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="文件添加"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;文件添加</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="文件查询"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;文件查询</a>
                                </dd>
                            </dl>
                        </li>
                            
                            <%--系统管理--%>
                        <div><p style="font-size: 14px">系统管理</p></div>
                        <br>
                        <li class="layui-nav-item layui-nav-itemed  ">
                            <a class="" href="javascript:">流程管理</a>
                            <dl class="layui-nav-child">
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="运行流程"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;运行流程</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="固定流程管理"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;固定流程管理</a>
                                </dd>
                                <dd>
                                    <a data-url="https://www.baidu.com" data-id="3" data-title="自定义流程管理"
                                       class="site-actTab-active" href="javascript:"
                                       data-type="tabAdd">&nbsp;&nbsp;&nbsp;&nbsp;自定义流程管理</a>
                                </dd>
                            </dl>
                        </li>
                    
                    </ul>
                </c:if>
            </div>
        </div>
        
        <!-- 内容主体区域 -->
        <div class="layui-body" style="z-index: 0;overflow: hidden">
            <div class="layui-tab layui-tab-card" lay-filter="actTab" lay-allowclose="true" id="tab_div">
                <ul class="layui-tab-title" id="ul_tab" style="width: 78%;">
                    <li class="layui-this" lay-id="0">欢迎页</li>
                </ul>
                
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <iframe src="<c:url value="/welcome.jsp"/>" scrolling="no" width="100%" height="100%"
                                frameborder="0"></iframe>
                    </div>
                </div>
            </div>
            <a id="close_tab" href="javascript:" class="layui-btn layui-btn-danger layui-layout-right"
               style="margin-right:140px;margin-top: 10px;">关闭所有标签页</a>
        </div>
    </div>
</div>

</body>

<script>
    layui.use(['layer'], function () {
        if (typeof user === "undefined") {
            login();
        }
    })
</script>
</html>
